package com.hydl.power.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.hydl.power.service.HaiwellAccountService;
import com.hydl.power.utils.Resp;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * @author miss
 * @version V3.0
 * @since 2022/11/25 22:43
 */
@RestController
@RequestMapping("/haiwellAccount")
@Api(value = "HaiwellAccountController", tags = "海为账号管理")
@CrossOrigin
public class HaiwellAccountController {
    @Autowired
    private HaiwellAccountService haiwellAccountService;

    // @LogAnnotation(module = "海为账号管理",description = "通过token获取海为账号")
    @PostMapping("/getHaiwellAccountByToken")
    @ApiOperation(value = "通过token获取海为账号")
    public Resp getHaiwellAccountByToken(@RequestParam(required = true) String token) {
        return haiwellAccountService.getHaiwellAccountByToken(token);
    }
}
